/**
 * Created by Administrator on 2017/4/21.
 */

var toGate = module.exports;
var client;

toGate.setLink = function (c) {
    client = c;
};
toGate.send = function (uuid, action, obj) {
    var data = {};
    data.uuid = uuid;
    data.action = action;
    data.obj = obj;
    client.write(JSON.stringify(data) + '\n');
};
toGate.push = function (c, uuid, action, obj) {
    var data = {};
    data.uuid = uuid;
    data.action = action;
    data.obj = obj;
    c.write(JSON.stringify(data) + '\n');
};